package com.yequan.designpattern.proxy.second_generation;

import com.yequan.designpattern.proxy.IGamePlayer;

public class SecondGenerationTest {

    public static void main(String[] args) {
        GamePlayerProxy playerProxy = new GamePlayerProxy();
        playerProxy.setGamePlayer("叶权");
        playerProxy.login("yequan", "1");
        playerProxy.killBoss();
        playerProxy.upgrade();


        playerProxy.setGamePlayer("张三");
        playerProxy.login("zhangsan", "1");
        playerProxy.killBoss();
        playerProxy.upgrade();

        IGamePlayer gamePlayer = playerProxy.getGamePlayer("叶权");
        System.out.println(gamePlayer);

    }

}
